package com.yonyougov.devops.cruxcisupport.version;

import com.yonyougov.devops.cruxcisupport.version.vo.VersionNameVo;
import com.yonyougov.devops.fwc.core.dao.impl.BaseDaoImpl;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

/**
 * t_version数据层实现
 */
@Repository
public class VersionDaoImpl extends BaseDaoImpl<VersionEntity, BigInteger> implements VersionDao {
    private final SqlSessionTemplate sqlSessionTemplate;

    public VersionDaoImpl(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    //<!--用户自定义代码开始-->
    @Override
    public List<VersionNameVo> findAllNames(VersionEntity versionEntity) {
        String statement = VersionEntity.class.getName() + "Mapper.findAllNames";
        return sqlSessionTemplate.selectList(statement, versionEntity);
    }
    //<!--用户自定义代码结束-->
}
